<?php
use backend\assets\LayuiAsset;
LayuiAsset::register($this);
use yii\helpers\Html;
?>

<?php $this->beginPage() ?>
    <!DOCTYPE html>
    <html>
    <head>
        <meta charset="utf-8">
        <title>后台管理</title>
        <meta name="renderer" content="webkit">
        <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
        <meta http-equiv="Access-Control-Allow-Origin" content="*">
        <meta content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0;" name="viewport" />
        <meta name="apple-mobile-web-app-status-bar-style" content="black">
        <meta name="apple-mobile-web-app-capable" content="yes">
        <meta name="format-detection" content="telephone=no">
        <link rel="icon" href="favicon.ico">
        <?= Html::csrfMetaTags() ?>
        <title><?= Html::encode($this->title) ?></title>
        <?php $this->head() ?>
    </head>
    <body class="<?php if(Yii::$app->controller->id=='site' && Yii::$app->controller->action->id=='index'){echo "mainBody";}else{echo "childrenBody";}?>">
    <?php $this->beginBody() ?>
    <style>
        .layadmin-tips {
            margin-top: 30px;
            text-align: center;
        }
        .layadmin-tips .layui-icon[face] {
            display: inline-block;
            font-size: 300px;
            color: #393D49;
        }
        .layui-icon {
            font-family: layui-icon!important;
            font-size: 16px;
            font-style: normal;
            -webkit-font-smoothing: antialiased;
            -moz-osx-font-smoothing: grayscale;
        }
        .layadmin-tips .layui-text {
            width: 300px;
            margin: 30px auto;
            padding-top: 20px;
            border-top: 5px solid #5FB878;
            font-size: 16px;
        }
        .layui-text {
            line-height: 22px;
            font-size: 14px;
            color: #666;
        }
    </style>
    <!-- 移动导航 -->
    <div class="layui-fluid">
        <div class="layadmin-tips">
            <i class="layui-icon" style="color: #5FB878" face>&#x1005;

            </i>

            <div class="layui-text" style="font-size: 20px;color:#5FB878">
                <?=$msg;?><?=$url;?>
            </div>

        </div>
    </div>

    <?php $this->endBody() ?>
    </body>
    </html>
<?php $this->endPage() ?>
<script>
    layui.config({
        base : "js/"
    }).use(['form','layer','jquery'],function() {
        var form = layui.form,
            layer = parent.layer === undefined ? layui.layer : parent.layer,
            $ = layui.jquery;
        var url = "<?= $url?>";

        $('.open-icon').click(function(){
            layer.open({title:'图标选择', type: 2, area: ['630px', '530px'], fix: true, maxmin: false, content: url});
        });

       if (parent.layer.index > 0){
             setTimeout(function () {
                 layer.closeAll();

                 parent.location.href=url;
        },1000)
    }else{
           setTimeout(function () {

               parent.location.href=url;
           },1000)
    }
        /* setTimeout(function () {
             parent.location.reload();
         },1000);*/
        /* if (parent.layer.index > 0){
             parent.location.reload();
         }*/
    });</script>
